const isDef = (value) => {
  return value !== undefined && value !== null
}
const isObj = (x) => {
  const type = typeof x
  return x !== null && (type === 'object' || type === 'function')
}
const isNumber = (value) => {
  return /^\d+$/.test(value)
}
const range = (num, min, max) => {
  return Math.min(Math.max(num, min), max)
}

export default {
  isDef,
  isObj,
  isNumber,
  range,
}
